package com.shanzmoo.db.product.entity.vo;


import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;
import java.util.List;

@Data
@Accessors(chain = true)
@ApiModel("分类树返回对象")
public class CategoryVo {

    @ApiModelProperty("分类id")
    private Integer id;

    @ApiModelProperty("分类名")
    private String name;

    @ApiModelProperty("父分类id")
    private Integer parentId;

    @ApiModelProperty("父分类名")
    private String parentName;

    @ApiModelProperty("是否上架商城")
    private Boolean shelves;

    @ApiModelProperty("状态")
    private Boolean status;

    @ApiModelProperty("描述")
    private String describe;

    @ApiModelProperty("分类级别")
    private Integer categoryLevel;

    @ApiModelProperty("创建人")
    private Integer createUser;

    @ApiModelProperty("图片路径")
    private String pictureUrl;

    @ApiModelProperty("创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private LocalDateTime createTime;

    @ApiModelProperty("子节点集合")
    private List<CategoryVo> children;

}
